package com.gp.learn.ssm.base.system.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import io.swagger.annotations.ApiOperation;
import com.gp.learn.ssm.base.core.mybaits.model.*;

import org.springframework.web.bind.annotation.RestController;
import com.gp.learn.ssm.base.system.entity.BaseMenu;
import com.gp.learn.ssm.base.system.service.BaseMenuService;
import com.gp.learn.ssm.base.core.mybaits.base.controller.BaseController;

/**
 * 系统资源-菜单信息 前端控制器
 * @author gp
 * @since 2020-07-24
 */
@RestController
@RequestMapping("/base-menu")
public class BaseMenuController extends BaseController <BaseMenuService, BaseMenu> {

        @ApiOperation(value = "系统资源-菜单信息-分页列表", notes = "系统资源-菜单信息分页列表")
        @GetMapping(value = "page")
        public ResultBody pageList(PageModel pageModel) {
            return bizService.pageList(pageModel);
        }

        @ApiOperation(value = "系统资源-菜单信息-列表", notes = "系统资源-菜单信息列表")
        @GetMapping(value = "list")
        public ResultBody list(ListModel listModel) {
            return bizService.listEntityMap(listModel);
        }

        @ApiOperation(value = "系统资源-菜单信息-添加", notes = "添加系统资源-菜单信息")
        @PostMapping(value = "save")
        public ResultBody save(SaveModel saveModel) {
            return bizService.add(saveModel);
        }

        @ApiOperation(value = "系统资源-菜单信息-更新", notes = "更新系统资源-菜单信息")
        @PostMapping(value = "update")
        public ResultBody update(UpdateModel updateModel) {
            return bizService.edit(updateModel);
        }

        @ApiOperation(value = "系统资源-菜单信息-删除", notes = "删除系统资源-菜单信息")
        @PostMapping(value = "delete")
        public ResultBody delete(DeleteModel deleteModel) {
            return bizService.delete(deleteModel);
        }


        @ApiOperation(value = "系统资源-菜单信息-详情", notes = "系统资源-菜单信息详情")
        @GetMapping(value = "get")
        public ResultBody get(GetModel getModel) {
            return bizService.get(getModel);
        }
}

